/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.qjs.smterp.jpa;

import java.io.Serializable;
import java.util.List;

import org.springframework.stereotype.Repository;

import com.qjs.smterp.model.Employee;
@Repository("employeeDao")
public class EmployeeDaoImpl extends AbstractHibernateDAOImpl<Employee, Long> implements EmployeeDao  , Serializable{

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	@Override
	protected Class<Employee> getDomainClass() {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public Employee findByCode(String code) {
		// TODO Auto-generated method stub
		return (Employee)getSession().getNamedQuery("Employee.findByEmployeeCode").uniqueResult();
		
	}

	@SuppressWarnings("unchecked")
	@Override
	public List<Employee> findByAll() {
		// TODO Auto-generated method stub 
		return getSession().getNamedQuery("Employee.findAll").list();
	}

	@Override
	public Employee findById(int Id) {
		// TODO Auto-generated method stub
		return null;
	}
    
}
